var thisSearchSortProxy;
var currentSearchCriteriaPage=1;
var startSearchCriteria=0;
var countSearchCriteria=5;

var currentSortCriteriaPage=1;
var startSortCriteria=0;
var countSortCriteria=5;

var SearchSortProxy = Objs("model.SearchSortProxy",
	Proxy,
{
	initialize: function( name,lists)
	{ 
		SearchSortProxy.$super.initialize.call( this, name,lists);
		thisSearchSortProxy = this;
		//thisad=this;
		//alert("S");
	},	
	load:function()
	{
		
		var pagelimit=new Object();
		pagelimit.searchStart=startSearchCriteria;
		pagelimit.searchCount=countSearchCriteria;
		
		pagelimit.sortStart=startSortCriteria;
		pagelimit.sortCount=countSortCriteria;

		$.ajax({
				type: "POST",
				data:pagelimit,
				url:"../services/AssetService.php?action=getSearchSortCriterias",
				success: function(data,status) {
					var resultJSONObj = eval('(' + data + ')');
					thisSearchSortProxy.sendNotification( NotificationNames.SEARCH_SORT_LOADED, resultJSONObj );	
						//$("#datacontent").show();
			
						//$("#progress").hide();
				},
				error:function(error,response){
				}
			});
	},
	loadSortCriterias:function()
	{
		
		var pagelimit=new Object();
		pagelimit.start=startSortCriteria;
		pagelimit.count=countSortCriteria;
		
		$.ajax({
				type: "POST",
				data:pagelimit,
				url:"../services/AssetService.php?action=getSortCriterias",
				success: function(data,status) {
					var resultJSONObj = eval('(' + data + ')');
					thisSearchSortProxy.sendNotification( NotificationNames.SORT_CRITERIAS_LOADED, resultJSONObj );	
					
						//$("#datacontent").show();
			
						//$("#progress").hide();
				},
				error:function(error,response){
				}
		});
	},
	loadSearchCriterias:function()
	{
		
		var pagelimit=new Object();
		pagelimit.start=startSearchCriteria;
		pagelimit.count=countSearchCriteria;
		
		$.ajax({
				type: "POST",
				data:pagelimit,
				url:"../services/AssetService.php?action=getSearchCriterias",
				success: function(data,status) {
					var resultJSONObj = eval('(' + data + ')');
					thisSearchSortProxy.sendNotification( NotificationNames.SEARCH_CRITERIAS_LOADED, resultJSONObj );	
						//$("#datacontent").show();
			
						//$("#progress").hide();
				},
				error:function(error,response){
				}
		});
	},
	
	
	
});
 